<template>
  <div>
    <Chart :cdata="cdata" />
  </div>
</template>

<script>
import Chart from './chart.vue'
export default {
  data () {
    return {
      cdata: {
        category: [],
        lineData: [],
        barData: [],
        rateData: []
      }
    };
  },
  components: {
    Chart,
  },
  mounted () {
    this.getDemo()
  },
  methods: {
    getDemo(){
      this.$axios.get('./data.json')
          .then(res=>{
            this.cdata.category=res.data.id
            this.cdata.lineData=res.data.data11
            this.cdata.barData=res.data.data5l
          })
    }
  }
};
</script>

<style lang="scss" scoped>
</style>
